import request from "@/utils/request"

/**
 * 获取小程序配置
 */
export function getMiniAppConfig() {
  return request.get('/system-groups/get-index-app-config')
}

/**
 * 获取首页数据
 */
export function indexData() {
  return request.get('/system-groups/get-index-data')
}

/**
 * 分页获取组合商品
 */
export function getIndexDetailPage(params) {
  return request.get('/system-groups/get-index-detail-page', { params })
}

/**
 * 获取组合数据信息
 */
export function getIndexDetailById(id) {
  return request.get(`/system-groups/get-index-detail-by-id/${id}`)
}

/**
 * 会员充值策略
 */
export function memberRechargeStrategyList() {
  return request.get(`/system/member/recharge-strategy/list`)
}

/**
 * 获取小程序配置
 */
export function getCommonConfig(title) {
  return request.get('/system-groups/get-common-config', {
    params: {
      title
    }
  })
}

/**
 * 获取子组合数据
 */
export function getCommonSonConfig(title, son) {
  return request.get('/system-groups/get-common-son-config',{
    params: { title, son }
  })
}